package com.elong.businesstravel.protocol.city;

import java.io.IOException;

import org.apache.http.Header;
import org.json.JSONObject;

import com.elong.businesstravel.entitys.City;
import com.elong.businesstravel.protocol.baseresponse.BaseELongJsonHttpResponse;

public class GetCityByLatLngResponse extends BaseELongJsonHttpResponse {

	public City mCity = new City();
	
	@Override
	public void onSuccess(int statusCode, Header[] headers,
			JSONObject mainJsonObject) throws Throwable {
		
		JSONObject responseJsonObject = mainJsonObject.getJSONObject("response");
		mCity.allCode = responseJsonObject.optString("allcode", "");
		mCity.provinceId = responseJsonObject.optString("provinceid", "");
		mCity.cityName = responseJsonObject.optString("cityname", "");
		mCity.firstCode = responseJsonObject.optString("firstcode", "");
		mCity.cityId = responseJsonObject.optString("cityid", "");

	}

}
